<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="zh-CN">
<!--页头引入-->
<head ms-controller="head">
    <title>碳素云MC聊天室</title>
    <meta content="碳素云MC聊天室" name="Description">
    <meta content="minecrift 服务器 聊天室 碳素云" name="Keywords">
    <meta charset="UTF-8">
    <!--坑爹的IE兼容-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--坑爹的将360默认为极速模式打开-->
    <meta name="renderer" content="webkit">
    <!--移动优先-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--图标引入-->
    <!--bootstrap引入-->
    <link href="./src/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <!--引入btn-->
    <link href="./src/css/btn.css" rel="stylesheet" type="text/css"/>
    <!--fontAwesone 引入-->
    <link href="./src/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <!--[if lte IE 7]>
    <link href="./src/css/font-awesome-ie7.min.css" rel="stylesheet" type="text/css"/>

    <![endif]-->
    <!--本地CSS-->
    <link href="./src/css/mooshroom.css" rel="stylesheet">
    <link href="./src/css/local.css" rel="stylesheet">
    <!--todo 所有插件的样式在js内部加载-->
    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "//hm.baidu.com/hm.js?2a1a68370e4ad0282396750f6d1809d7";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>

<body>
<!--内容开始-->

<div ms-controller="layout">
    <div ms-include-src="chat"></div>


</div>
<div ms-controller="uiBox">
    <div ms-widget="tip,tip,$opta"></div>
    <div ms-widget="modal,modal,$optb">
        <div style="width: 600px">
            <div ms-include-src="url"></div>
        </div>
    </div>
    <div ms-widget="skyClock,skyClock,$optc"></div>
    <div ms-widget="ws,ws,$optd"></div>
</div>

<!--jquery-->
<!--<script src="./src/js/jquery-1.10.2.min.js" type="text/javascript"></script>-->

<!--[if lt IE 9]>
<script src="./src/js/html5shiv.min.js"></script>
<script src="./src/js/respond.min.js"></script>
<![endif]-->


<!--avalon-->
<script src="./src/js/avalon.min.js"></script>
<script src="./src/js/mmRequest.js"></script>

<!--[if lt IE 9]>
<script src="./src/js/mmRouter.js"></script>
<![endif]-->

<!--插件引入-->
<script src="./plugins/cache/cache.js"></script>
<script src="./plugins/call/call.Mobile.js"></script>
<script src="./plugins/door/door.js"></script>
<script src="./plugins/validate/regCheckOut.js"></script>

<!--控制器引入-->
<script src="./config.js"></script>
<script src="./router.js"></script>
<script src="./layout.js"></script>
<script>


    require(["stb"], function () {
        stb.ready()
//        document.getElementById("stb").style.display="block"
        avalon.scan()
    })


    //引入tip组件以及弹出框组件
    require(["../../ui/tip/tip.js", '../../ui/modal/modal.js','../../ui/skyClock/skyClock.js','../../ui/ws/ws.js'], function () {

        //配置父元素的VM
        var uiBox = avalon.define({
            $id: "uiBox",
            $opta: {},
            $optb: {},
            $optc:{},
            $optd:{
                server:'ws://121.41.115.217:9999',
                onopen:function(){
                    var s=cache.go("un")||""
                    ws.call(1,"reg",s)

                    function showLinkState(){
                        if(window.chat){
                            chat.contant="连接良好"
                        }
                        else{
                            setTimeout(function(){
                                showLinkState()
                            },400)
                        }
                    }
                    showLinkState()


                }
            }
        })
        avalon.scan()
        tip.on("( ^３^ )╱~~欢迎回来", 1, 3000)
    })

</script>



</body>
</html>